package com.heima.wemedia.controller.v1;

import com.heima.model.comment.dto.CommentRepayDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WeMediaCommentDto;
import com.heima.wemedia.service.WeMediaCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/v1/comment/manage")
public class WeMediaCommentController {

    @Autowired
    private WeMediaCommentService commentService;
    @PostMapping("find_news_comments")
    public ResponseResult findCommentList(@RequestBody WeMediaCommentDto dto){
        return commentService.findCommentList(dto);
    }


    @PostMapping("/comment_repay")
    public ResponseResult commentRepay(@RequestBody CommentRepayDto dto){
       return commentService.commentRepay(dto);
    }
}
